package com.zr.inquiryenum;

/**
 * Created by 天赐 on 2019/12/25.
 */
public enum TypeEnum {

    WEIBAOJIA("未报价",0),YIBAOCUN("已保存",10),YITIJIAO("已提交",20),YISHENHE("已审核",30),YIZUOFEI("已作废",40);

    private String name;
    private Integer value;

    private TypeEnum(String name, Integer value){
        this.name=name;
        this.value=value;

    }

    //普通方法 通过value获取名称
    public static  String getName(Integer value) {
        for (TypeEnum c: TypeEnum.values()) {
            if (c.getValue()==value){
                return c.name;
            }
        }
        return null;
    }

    public String getName(){
        return name;
    }
    public Integer getValue(){
        return value;
    }
}
